package GUIPanels;
import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JPanel;

import World.World;


public class WorldPanel extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	
	public void paint(Graphics g)
	{
		//g = temp;
		int height = World.environGrid.length; //Main.myWorld.grid.length;
		int width = World.environGrid[0].length;// Main.myWorld.grid[0].length;
		int cellSize = World.cellSize; //Main.myWorld.cellSize;
			for (int i=0; i<height; i++)
			{
				for (int j=0; j<width; j++)
				{
					// Draw environment
					//System.out.println(Main.myWorld.environGrid[i][j].name);
					//g.setColor(World.environGrid[i][j].tileColor); // PUT THIS LINE BACK IN
					g.setColor(Color.white);
					//System.out.println(g.getColor().toString());
					
					g.fillRect(j*cellSize,i*cellSize,cellSize, cellSize);

				}
			}
	}
}